import {createApp} from 'vue'
import App from './App.vue'
import './style.css';

import ViewUIPlus from 'view-ui-plus';
import 'view-ui-plus/dist/styles/viewuiplus.css'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElIcon from '@element-plus/icons-vue'

import { createPinia } from 'pinia'
import piniaPluginPersistedState from 'pinia-plugin-persistedstate';
const pinia = createPinia()
pinia.use(piniaPluginPersistedState);

// 自动找到index.js这个文件
import router from '@/router'

const app = createApp(App);
app.use(router);
app.use(pinia);
app.use(ViewUIPlus);
app.use(ElementPlus);
Object.keys(ElIcon).forEach((key) => {
    app.component(key, ElIcon[key])
})
app.mount('#app');